<template>
  <div class="header">
    <header>
      <div>
        <i @click="goBack"><van-icon name="arrow-left" size="28" /></i>
      </div>
      <div>
        <slot><span>购物车</span></slot>
      </div>
      <div><i></i></div>
    </header>
  </div>
</template>

<script>
export default {
  methods: {
    goBack() {
      // this.$router.go(-1)
      this.$router.push("/home")
    },
  },
}
</script>

<style scoped>
.header {
  overflow: hidden;
  height: 2.75rem /* 44/16 */;
}
header {
  overflow: hidden;
  position: fixed;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 2.75rem /* 44/16 */;
  background-color: rgb(248, 252, 255);
}

header div i,
span {
  color: black;
}

header div i {
  padding: 0 0.625rem 10/16;
}

header div span {
  font-size: 1.125rem /* 18/16 */;
}
</style>
